package sprite;

import java.awt.Color;

import java.util.LinkedList;

public class TetroStraight extends Tetromino {

  private final Color core = Color.BLUE;
  private final Color s1   = Color.GREEN;
  private final Color s2   = Color.GRAY;
  
  public TetroStraight(int x, int y, int width, int height) {
    super(width, height);
    
    setPointX(x);
    setPointY(y);
    
    initializeTetrominoGrid(4, 4);
    
    LinkedList<Tetrobox[][]> rotations = new LinkedList<Tetrobox[][]>();
    
    Tetrobox[][] tetrosquare =  newTetrominoGrid(width, height, 4, 4);
    
    tetrosquare[0][0] = new Tetrobox(0, 0, width, height, true);
    tetrosquare[0][1] = new Tetrobox(0, 1, width, height, true);
    tetrosquare[0][2] = new Tetrobox(0, 2, width, height, true);
    tetrosquare[0][3] = new Tetrobox(0, 3, width, height, true);
    
    tetrosquare[0][0].setColors(core, s1, s2);
    tetrosquare[0][1].setColors(core, s1, s2);
    tetrosquare[0][2].setColors(core, s1, s2);
    tetrosquare[0][3].setColors(core, s1, s2);
    
    rotations.add(tetrosquare);
    Tetrobox[][] tetrosquare2 =  newTetrominoGrid(width, height, 4, 4);
    
    tetrosquare2[0][0] = new Tetrobox(0, 0, width, height, true);
    tetrosquare2[1][0] = new Tetrobox(1, 0, width, height, true);
    tetrosquare2[2][0] = new Tetrobox(2, 0, width, height, true);
    tetrosquare2[3][0] = new Tetrobox(3, 0, width, height, true);
    
    tetrosquare2[0][0].setColors(core, s1, s2);
    tetrosquare2[1][0].setColors(core, s1, s2);
    tetrosquare2[2][0].setColors(core, s1, s2);
    tetrosquare2[3][0].setColors(core, s1, s2);
    
    rotations.add(tetrosquare2);
    
    this.setRotations(rotations);
    
    setTetroHeight(4);
    setTetroWidth(1);
  }
  
  protected void rotateR() {
  
    super.rotateR();
  }
}
